package com.team11.server.service.admin;
import com.team11.server.mapper.Admin_Update_S_Mapper;
import com.team11.server.pojo.CInformation;
import com.team11.server.pojo.StuInformation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class Admin_Update_S_Service {
    @Autowired
    private Admin_Update_S_Mapper admin_update_s_mapper;

    public CInformation Sel_S_toUpdate(Integer sid){
        return admin_update_s_mapper.Sel_S_toUpdate(sid);
    }
    public String Sel_have_S(StuInformation stuInformation){
        Integer t=admin_update_s_mapper.Sel_have_S(stuInformation);
        if (t>0){
            return "学号或身份证已存在";
        }
        else return "1";
    }
    public String Update_S(StuInformation stuInformation){
        Integer t=admin_update_s_mapper.Update_S(stuInformation);
        if (t>0){
            return "修改成功";
        }
        else return "修改失败";
    }
}
